package com.jiuqi.common.authority.netrep;
import java.util.ArrayList;

import com.jiuqi.common.authority.netrep.origin.AuthorityException;
import com.jiuqi.common.authority.netrep.origin.AuthorizeException;
import com.jiuqi.common.authority.netrep.origin.OrganizationInfo;
import com.jiuqi.common.authority.netrep.origin.RoleInfo;
import com.jiuqi.common.authority.netrep.origin.UserInfo;

public interface AuthorizationEntiMngI {
	  public long getModifyTime();
	  public String addOrganization(String operator, OrganizationInfo oi) throws AuthorityException;
	  public boolean editOrganization(String operator, OrganizationInfo oi) throws AuthorizeException, AuthorityException;
	  public boolean delOrganization(String operator, String guid, boolean withChildren) throws AuthorizeException, AuthorityException;
	  public ArrayList getAllOrganizations(String operator) throws AuthorityException;
	  public OrganizationInfo queryOrganization(String operator, String guid) throws AuthorizeException, AuthorityException;
	  public ArrayList getRootOrganizations(String operator) throws AuthorityException;
	  public ArrayList getChildOrganizations(String operator, String parent) throws AuthorityException;
	  public String findOrganization(String org_name) throws AuthorityException;
	  public boolean exchangeOrganizationOrder(String guid1, String guid2) throws AuthorityException;
	  public String addUser(String operator, UserInfo ui) throws AuthorityException;
	  public boolean editUser(String operator, UserInfo ui) throws AuthorizeException, AuthorityException;
	  public boolean delUser(String operator, String usr_guid) throws AuthorizeException, AuthorityException;
	  public String findUser(String usr_name) throws AuthorityException;
	  public boolean exchangeUserOrder(String guid1, String guid2) throws AuthorityException;
	  public String getUserTitle(String usr_guid) throws AuthorityException;
	  public ArrayList getAllUsers(String operator) throws AuthorityException;
	  public UserInfo queryUser(String operator, String usr_guid) throws AuthorizeException, AuthorityException;
	  public ArrayList queryAllUsersRecord() throws AuthorizeException, AuthorityException;
	  public ArrayList queryAllRolesRecord() throws AuthorizeException,AuthorityException ;
	  public ArrayList queryAllOrganizationsRecord() throws AuthorizeException,AuthorityException ;
	  public ArrayList queryLinkUsersRecord(String linkto) throws AuthorizeException,AuthorityException;
	  public ArrayList queryLinkRolesRecord(String user_guid) throws AuthorizeException,AuthorityException ;
	  public ArrayList queryLinkOrganizationsRecord(String user_guid) throws AuthorityException ;
	  public boolean changePassword(String operator, String usr_guid, String oldpw, String newpw) throws AuthorizeException, AuthorityException;
	  public String checkLogin(String usr_name, String password) throws AuthorityException;
	  public String checkLoginEx(String usr_name, String password, String bindIPs) throws AuthorityException;
	  public String addRole(String operator, RoleInfo ri) throws AuthorityException;
	  public boolean editRole(String operator, RoleInfo ri) throws AuthorizeException, AuthorityException;
	  public boolean delRole(String operator, String guid) throws AuthorizeException, AuthorityException;
	  public ArrayList getAllRoles(String operator) throws AuthorityException;
	  public RoleInfo queryRole(String operator, String guid) throws AuthorizeException, AuthorityException;
	  public String findRole(String rl_name) throws AuthorityException;
	  public boolean exchangeRoleOrder(String guid1, String guid2) throws AuthorityException;
	  public boolean addLink(String operator, String linkto, String user, boolean isorg) throws AuthorizeException, AuthorityException;
	  public boolean delLink(String operator, String linkto, String user) throws AuthorizeException, AuthorityException;
	  public ArrayList getLinkUsers(String operator, String linkto) throws AuthorizeException, AuthorityException;
	  public ArrayList getUserOwners(String operator, String user) throws AuthorizeException, AuthorityException;
	  public ArrayList getUserRoles(String operator, String user) throws AuthorizeException, AuthorityException;
	  public ArrayList getUserOrganizations(String operator, String user) throws AuthorizeException, AuthorityException;
	  public boolean exchangeLinkOrder(String parent, String guid1, String guid2) throws AuthorityException;
	  public com.jiuqi.common.authority.netrep.origin.RoleInfo[] getAllUserRoles(String userGuid) throws AuthorizeException, AuthorityException;

}
